#include <QtWebKit/QWebView>
#include <QUrl>
#include "serverinfo.h"
#include "ui_serverinfo.h"

ServerInfo::ServerInfo(QWidget *parent) :
    QDialog(parent),
    m_ui(new Ui::ServerInfo)
{
    m_ui->setupUi(this);
    serverAddress = QString("localhost");
    serverPort = 8080;
}

ServerInfo::~ServerInfo()
{
    delete m_ui;
}

void ServerInfo::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        m_ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void ServerInfo::Load()
{
    QUrl url;
    url.setUrl(QString("http://").append(serverAddress) );
    url.setPort(serverPort);

    m_ui->webView->load(url);

}
